<template lang="pug">
  span.zgplugin-qr-code.zgplugin-empty(v-if="(!exist || !valEmpty)&&editor")
    svg-icon.empty-icon(icon-class="组件二维码")
  .zgplugin-qr-code(v-else-if="exist&&valEmpty")
    .qr-code-label {{config.label}}
    canvas(class="canvas" :class="valEmpty?'':'opacity-0'")
</template>

<script>
import renderCommon from '../common/renderCommon'

export default {
  mixins: [renderCommon]
}
</script>

<style scoped lang="scss">
  .zgplugin-qr-code {
    margin-top: 16px;
    border-bottom:1px solid transparent;
    box-sizing: border-box;
    display:flex;
    .qr-code-label{
      display: inline-block;
    }
  }

</style>
